//
//  UIView+getISOImage.m
//  面试例子
//
//  Created by song on 15/8/18.
//  Copyright (c) 2015年 song. All rights reserved.
//

#import "UIView+getISOImage.h"

@implementation UIView (getISOImage)

-(UIImage *)getIOSImage
{

    UIGraphicsBeginImageContext(self.frame.size);
    
    [self.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
    
    return image;
}

@end
